/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.customer.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.service.TreeService;
import com.jeeplus.common.utils.StringUtils;
import com.jeeplus.modules.customer.entity.CustomerInformation;
import com.jeeplus.modules.customer.mapper.CustomerInformationMapper;

/**
 * 客户信息Service
 * @author 卢经纬
 * @version 2018-06-29
 */
@Service
@Transactional(readOnly = true)
public class CustomerInformationService extends TreeService<CustomerInformationMapper, CustomerInformation> {

	public CustomerInformation get(String id) {
		return super.get(id);
	}
	
	public List<CustomerInformation> findList(CustomerInformation customerInformation) {
		if (StringUtils.isNotBlank(customerInformation.getParentIds())){
			customerInformation.setParentIds(","+customerInformation.getParentIds()+",");
		}
		return super.findList(customerInformation);
	}
	
	@Transactional(readOnly = false)
	public void save(CustomerInformation customerInformation) {
		super.save(customerInformation);
	}
	
	@Transactional(readOnly = false)
	public void delete(CustomerInformation customerInformation) {
		super.delete(customerInformation);
	}
	
}